package com.zzty.txj1.dao;


import com.zzty.txj1.entity.Group;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface GroupMapper {
//    @Select("select * from user where classId=#{clazzId} and id not in(#{id})")
//    List<User> getUser2ById(User user);

    @Insert("insert into groupp(userName1,userName2,clazzId) values(#{userName1},#{userName2},#{clazzId})")
    Integer setGroup(@Param("userName1") String userName1, @Param("userName2") String userName2, @Param("clazzId") Integer clazzId);

    @Select("select * from groupp where clazzId=#{clazzId}")
    List<Group> getGroup(Integer clazzId);

    @Delete("delete from groupp where id=#{groupId}")
    Integer deleteGroup(Integer groupId);
}
